package cc.md888.app.application.activatecode;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
public class ActivateCodeGenerator {

    public String gen(){
        String table = "1234567890";
        String code = "";
        for(int i=0; i< 6; i++){
            code += table.charAt(
                    (int)(Math.random() * table.length())
            );
        }
        return code;
    }
}
